f9922f231854e4286058954e780c40988565e44f,platform/lang-impl/src/com/intellij/diagnostic/logging/LogConfigurationPanel.java,LogConfigurationPanel,LogConfigurationPanel,#,75

Before Change


    myFilesTable.setShowHorizontalLines(false);
    myFilesTable.setShowVerticalLines(false);
    myFilesTable.setIntercellSpacing(new Dimension(0, 0));
    myAddButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        ArrayList<LogFileOptions> newList = new ArrayList<LogFileOptions>(myModel.getItems());
        LogFileOptions newOptions = new LogFileOptions("", "", true, true, false);
        if (showEditorDialog(newOptions)) {
          newList.add(newOptions);
          myModel.setItems(newList);
          int index = myModel.getRowCount() - 1;
          myModel.fireTableRowsInserted(index, index);
          myFilesTable.setRowSelectionInterval(index, index);
        }
      }
    });
    myRemoveButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        TableUtil.stopEditing(myFilesTable);
        final int[] selected = myFilesTable.getSelectedRows();
        if (selected == null || selected.length == 0) return;
        for (int i = selected.length - 1; i >= 0; i--) {
          myModel.removeRow(selected[i]);
        }
        for (int i = selected.length - 1; i >= 0; i--) {
          int idx = selected[i];
          myModel.fireTableRowsDeleted(idx, idx);
        }
        int selection = selected[0];
        if (selection >= myModel.getRowCount()) {
          selection = myModel.getRowCount() - 1;
        }
        if (selection >= 0) {
          myFilesTable.setRowSelectionInterval(selection, selection);
        }
        myFilesTable.requestFocus();
      }
    });
    myRemoveButton.setEnabled(false);
    myFilesTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent e) {

After Change


    myFilesTable.setIntercellSpacing(new Dimension(0, 0));

    myScrollPanel.add(
      ToolbarDecorator.createDecorator(myFilesTable)
        .setAddAction(new AnActionButtonRunnable() {
          @Override
          public void run(AnActionButton button) {
            ArrayList<LogFileOptions> newList = new ArrayList<LogFileOptions>(myModel.getItems());
            LogFileOptions newOptions = new LogFileOptions("", "", true, true, false);
            if (showEditorDialog(newOptions)) {
              newList.add(newOptions);
              myModel.setItems(newList);
              int index = myModel.getRowCount() - 1;
              myModel.fireTableRowsInserted(index, index);
              myFilesTable.setRowSelectionInterval(index, index);
            }
          }
        }).setRemoveAction(new AnActionButtonRunnable() {
        @Override
        public void run(AnActionButton button) {
          TableUtil.stopEditing(myFilesTable);
          final int[] selected = myFilesTable.getSelectedRows();
          if (selected == null || selected.length == 0) return;
          for (int i = selected.length - 1; i >= 0; i--) {
            myModel.removeRow(selected[i]);
          }
          for (int i = selected.length - 1; i >= 0; i--) {
            int idx = selected[i];
            myModel.fireTableRowsDeleted(idx, idx);
          }
          int selection = selected[0];
          if (selection >= myModel.getRowCount()) {
            selection = myModel.getRowCount() - 1;
          }
          if (selection >= 0) {
            myFilesTable.setRowSelectionInterval(selection, selection);
          }
          myFilesTable.requestFocus();
        }
      }).setEditAction(new AnActionButtonRunnable() {
        @Override
        public void run(AnActionButton button) {
          final int selectedRow = myFilesTable.getSelectedRow();
          final LogFileOptions selectedOptions = myFilesTable.getSelectedObject();
          showEditorDialog(selectedOptions);
          myModel.fireTableDataChanged();
          myFilesTable.setRowSelectionInterval(selectedRow, selectedRow);
        }
      }).setRemoveActionUpdater(new AnActionButtonUpdater() {
        @Override
        public boolean isEnabled(AnActionEvent e) {
          return myFilesTable.getSelectedRowCount() >= 1 &&
                 !myLog2Predefined.containsKey(myFilesTable.getSelectedObject());
        }
      }).setEditActionUpdater(new AnActionButtonUpdater() {
        @Override
        public boolean isEnabled(AnActionEvent e) {
          return myFilesTable.getSelectedRowCount() >= 1 &&
                 !myLog2Predefined.containsKey(myFilesTable.getSelectedObject()) &&
                 myFilesTable.getSelectedObject() != null;
        }
      }).disableUpDownActions().createPanel(), BorderLayout.CENTER);

    myWholePanel.setPreferredSize(new Dimension(-1, 150));
    myOutputFile.addBrowseFolderListener("Choose File to Save Console Output", "Console output would be saved to the specified file", null,